<template>
<div>
  <van-nav-bar
    :title="$store.getters.title"
    @click-left="onClickLeft"
    @click-right="onClickRight"
    :fixed='true'
  >
  <template #left v-if="$store.getters.leftIconIsShow">
    <van-icon name="arrow-left" size="18"  color="#323233"/>
  </template>
  <template #right>
    <van-icon name="weapp-nav" size="18" color="#323233"/>
  </template>
  </van-nav-bar>
</div>
</template>

<script>
import { Toast } from 'vant';
export default {
  name: 'navBar',
  data(){
    return{
      leftIconIsShow:true
    }
  },
  methods: {
    onClickLeft() {
      Toast('返回');
    },
    onClickRight() {
      Toast('按钮');
    },
  }
}
</script>
